const add = function add(x, y) {
  return x + y;
};

console.log(add(1, 2));
const p = new Promise((resolve) => {
  setTimeout(() => {
    console.log('定时器执行完成');
    resolve();
  }, 1000);
});
console.log(p);
